Read-me for "The Polarization Dynamics of Electoral Reforms"

This folder contains all of the code and data necessary to replicate the results in the manuscript. To replicate the results, execute the shell script "Analysis/Code/Exec_File.sh". The script will call a Stata .do file "Data_Analysis.do" that generates all of the tables in the manuscript. This .do file will also save the .csv files necessary to reproduce Figures 6 and 7. The script will then call a Matlab program "Polarization_Counterfactual.m" to generate Figures 6 and 7. The script will conclude by running "create_theory_figures.R", which generates Figures 1-5, and "gen_t_a1.R", which generates Table A.1. 

If you are running a Windows machine, you can use the free software 7zip to unzip the compressed .cpgz folder. If you are using a Windows machine the shell script will not run properly. In this case, you can first individually run the Stata .do file "Data_Analysis.do", then run the Matlab program "Polarization_Counterfactual.m", and then "create_theory_figures.R" and "gen_t_a1.R" in R to reproduce all of the tables and figures. 